﻿using System;
using AMS.DataAccess.Trademark.BO.Enums;

namespace AMS.DataAccess.Trademark.BO
{
    [DBTable("TT_Task")]
    public class TaskInfo
    {
        public const string TaskType_Task = "T";
        public const string TaskType_Monitor = "M";

        #region Database Column Fields
        [DBPrimaryKeyColumn("AID", true)]
        public int AID { get; set; }

        [DBColumn("Type")]
        public string Type { get; set; }

        [DBColumn("TaskIndex")]
        public string TaskIndex { get; set; }

        [DBColumn("TaskName")]
        public string TaskName { get; set; }

        [DBEnumColumn("Priority", typeof(TaskPriority))]
        public TaskPriority Priority { get; set; }

        [DBEnumColumn("Status", typeof(TaskStatus))]
        public TaskStatus Status { get; set; }

        [DBColumn("CaseID", 0)]
        public int CaseID { get; set; }

        [DBColumn("RefRFID", 0)]
        public int RefRFID { get; set; }

        [DBColumn("RefTaskID", 0)]
        public int RefTaskID { get; set; }

        [DBColumn("isAssigned")]
        public bool isAssigned { get; set; }

        [DBColumn("OwnerID", 0)]
        public int OwnerID { get; set; }

        [DBDateTime("StartDateTime", DateTimeType.DateTime)]
        public DateTime StartDateTime { get; set; }

        [DBDateTime("CompleteDateTime", DateTimeType.DateTime)]
        public DateTime CompleteDateTime { get; set; }

        [DBColumn("OuterDeadline")]
        public int OuterDeadline { get; set; }

        [DBColumn("InnerDeadline")]
        public int InnerDeadline { get; set; }

        [DBDateTime("OuterDeadlineDate", DateTimeType.Date)]
        public DateTime OuterDeadlineDate { get; set; }

        [DBDateTime("InnerDeadlineDate", DateTimeType.Date)]
        public DateTime InnerDeadlineDate { get; set; }

        [DBColumn("Note")]
        public string Note { get; set; }

        [DBColumn("CheckNote")]
        public string CheckNote { get; set; }

        [DBColumn("TaskRole")]
        public string TaskRole { get; set; }

        [DBDateTime("ModifyDateTime", DateTimeType.DateTime, true, false)]
        public DateTime ModifyDateTime { get; set; }

        [DBColumn("ModifyUserID", true, false)]
        public int ModifyUserID { get; set; }

        [DBDateTime("CreateDateTime", DateTimeType.DateTime, false, true)]
        public DateTime CreateDateTime { get; set; }

        [DBColumn("CreateUserID", false, true)]
        public int CreateUserID { get; set; }

        [DBColumn("isGenBill")]
        public bool isGenBill { get; set; }

        #endregion

        [DBColumn("CaseIndex", true, true)]
        public string CaseIndex { get; set; }
    }
}
